'use strict'
const path = require('path')

function resolve(dir) {
  return path.join(__dirname, dir)
}

module.exports = {
  outputDir: process.env.outputDir,
  publicPath: './',
  assetsDir: 'static',
  productionSourceMap: false,
  devServer: {
    disableHostCheck: true,
    port: 3300,
    https: false,
    open: true,
    // proxy: {
    //   // 本地
    //   '/api': {
    //     target: process.env.VUE_APP_DOMAIN, // 接口地址的前缀
    //     changeOrigin: true, // 允许websockets跨域
    //     pathRewrite: {
    //       '^/api': '/api'
    //     }
    //   }
    // },
    hot: true,
    clientLogLevel: 'warning'
  },
  transpileDependencies: [
    '*'
  ],
  configureWebpack: {
    resolve: {
      alias: {
        '@': resolve('src')
      }
    }
  }
}
